<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%-- Created by IntelliJ IDEA. --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
  <head>
    <title></title>
  </head>
  <body>
    <table border="1">
      <tr>
        <th width="80px" >类别</th>
        <th width="80px">品种</th>
        <th width="80px">产地</th>
        <th width="120px">总重量（公斤）</th>
        <th width="120px">单价（元/公斤）</th>
        <th width="80px">操作</th>
      </tr>

      <c:forEach var="f" items="${list }">
        <tr>
          <td>${f.type }</td>
          <td>${f.breed }</td>
          <td>${f.area }</td>
          <td>${f.weight }</td>
          <td>${f.price }</td>
          <td>
            <a href="FruitIdServlet?id=${f.fruitId }">详情</a>&nbsp;&nbsp;<a href="DeleteServlet?id=${f.fruitId}">删除</a>
            &nbsp;&nbsp;<a href="FruitIdServlet?id=${f.fruitId}">修改</a>&nbsp;&nbsp;<a href="add.jsp">添加</a>
          </td>
        </tr>
      </c:forEach>
    </table>
    <a href="ListServlet?pageNo=1">首页</a>
    <c:if test="${pageNo>1}">
    <a href="ListServlet?pageNo=${param.pageNo-1}">上一页</a>
    </c:if>
    <c:if test="${pageNo<page}">
    <a href="ListServlet?pageNo=${param.pageNo+1}">下一页</a>
    </c:if>
    <a href="ListServlet?pageNo=${page}">尾页</a>
  </body>
</html>